let CookieUtil = {
  get(key){
    // 判断cookie中是否有authorization，有则发请求添加购物车
    let cookie = document.cookie
    let key_value = cookie.split("; ")
    //
    let value = null
    // 遍历
    key_value.forEach(element => {
      console.log(element);
      // 继续拆分
      let arr = element.split("=")
      if(arr[0] == key){
        value = arr[1]
      }
    })
    //
    return value
  }
}
// 导出对象
export default CookieUtil